package com.rayjoy.games.flatcard.controller.user;

import com.rayjoy.games.flatcard.controller.user.vo.LoginResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.UUID;

/**
 * 用户action
 * Created by 赵占涛 on 14-11-1.
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @RequestMapping("login")
    public  @ResponseBody LoginResult login(String username, String password) {
        if("a".equals(username) && "a".equals(password)) {
            return new LoginResult(true, UUID.randomUUID().toString());
        } else {
            return new LoginResult(false);
        }
    }
}
